﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlUpdateVipForCustomer.ascx.cs" Inherits="ControlUser_ControlUpdateVipForCustomer" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<script type="text/javascript"  src='<%=ResolveUrl("~/JScript/jquery.alphanumeric.js")%>'></script>
<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />

<style type="text/css">
        .AutoExtender
        {
            font-family: Verdana, Helvetica, sans-serif;
            font-size: .8em;
            font-weight: normal;
            border: solid 1px #006699;
            line-height: 20px;
            padding: 10px;
            background-color: White;
            margin-left:10px;
            width: 300px;
        }
        .AutoExtenderList
        {
            border-bottom: dotted 1px #006699;
            cursor: pointer;
            color: Maroon;
        }
        .AutoExtenderHighlight
        {
            color: White;
            background-color: #006699;
            cursor: pointer;
        }
        #divwidth
        {
         width: auto !important;    
        }
        #divwidth div
       {
        width: auto !important;   
       }
       #divwidthMaHangInput
       {
       	width: auto !important;  
       }
        #divwidthMaHangInput div
       {
       	width: auto !important;  
       } 
       
 </style>
<script type="text/javascript">
    function pageLoad() {



        $("#<%= btSave.ClientID %>").click(function () {
            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });
        });

        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }
    }
</script>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="Block" >
    <ContentTemplate>
   
    <fieldset>
    <legend>Cập nhật Số thẻ VIP khách hàng</legend>
            <div class="fm-req">
                       <label for="txtMaTuVanVien">Mã khách hàng:</label>
                       <asp:TextBox ID="txtMaTVV" runat="server" CausesValidation="false" AutoPostBack="true" OnTextChanged="txtMaTVV_TextChanged" Width="100px" ></asp:TextBox>
           <div id="divwidth" style="overflow:scroll; height:150px;display:none"></div>
            <cc1:AutoCompleteExtender CompletionSetCount="12"
            CompletionInterval="10" 
            MinimumPrefixLength="1" 
            ServiceMethod="GetTTKhachHang"
            TargetControlID="txtMaTVV"
            ServicePath="~/Services/WebServiceNhapHoaDonBanHang.asmx"
            ID="AutoCompleteExtender1" 
            runat="server" CompletionListItemCssClass="AutoExtenderList"
             DelimiterCharacters="" Enabled="True" 
             CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
             CompletionListElementID="divwidth" 
            CompletionListCssClass="AutoExtender">
            </cc1:AutoCompleteExtender>              
                       <asp:TextBox ID="txtHoTen" runat="server" Width="200px"></asp:TextBox>
           </div>
           <div class="fm-req">
                       <label for="txtMaTuVanVien">Số thẻ VIP:</label>
                       <asp:TextBox ID="txtVip" runat="server" Width="200px"></asp:TextBox>
            </div>
        <asp:Button ID="btSave" runat="server" Text="Save" onclick="btSave_Click" />
    </fieldset>

</ContentTemplate>
</asp:UpdatePanel>